<?php
session_start();
if($_SESSION["memberId"] == null || $_SESSION["memberId"] == "")
{
	header("Location:../login.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>ユーザ一覧</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script language="JavaScript" src="../js/common.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>

<link href="../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script>
function delMember(memberId) {
	document.getElementById("act").value="delete";
	document.getElementById("memberId").value=memberId;
	document.getElementById("inputform").submit();
}
function leaveMember(memberId) {
	document.getElementById("act").value="leave";
	document.getElementById("memberId").value=memberId;
	document.getElementById("inputform").submit();
}
function showInfo(accountname,password)
{
	top_px=(screen.availHeight-250)/2;
	left_px=(screen.availWidth-350)/2;
	URL='AccountInfo.php?'+'accountname='+accountname+'&password='+password;
	window.open (URL,'アカウント情報', 'height=100,width=200,top='+top_px+',left='+left_px+'');
}
function ccStatusChange(ccmemberId,ccstatus)
{
    document.inputform.cc_change.value=1;
    document.inputform.cc_memberId.value=ccmemberId;
    document.inputform.cc_status.value=ccstatus;
    document.inputform.submit();
}
</script>
</head>
<body bgcolor="#F4FFE4">
<?php include("../head.php") ?>
<?php include("../Service/WebClass/admin/AdminSrchClass.php");
$adminSrch = new AdminSrch;
$adminSrch->mytask();
?>

<table width="100%" border="0" cellspacing="0" cellpadding="0">

 <tr>
    <td width="150" valign="top" bgcolor="#5C743D"><?php include("../adminMenu.php");?></td>
    <td  colspan="2" align="center" valign="top">
    <form name="inputform" id="inputform" method="post">
    <input type="hidden" name="cc_change" value="0"/>
    <input type="hidden" name="cc_memberId" value=""/>
    <input type="hidden" name="cc_status" value=""/>
    <?php
		echo "<input type=hidden name=act id=act value=submit>";
	    echo "<input type=hidden name=memberId id=memberId value=>";
    ?>
      <table width="100%" border="0" cellpadding="4" cellspacing="0" class="tbl where">
      <tr>
      	<td width="25%"><span id="sprytextfield1">
      	   ユーザ名
      	     <input name="user_name" type="text" class="txBox" id="user_name" value="<?php  echo $adminSrch->user_name ?>" /></td>
      <td width="53%">
                 登録状況<select name="is_incenter" class="txBox">
                     <option value="0">
                     <option value="1">登録済み
                     <option value="2">未登録
                     <option value="3">その他
                 </select>
                 同期状況<select name="sync_status" class="txBox">
                     <option value="0">
                     <option value="1">同期済み
                     <option value="2">未同期
                     <option value="3">同期エラー
                 </select>
                 <?php
                 if(isset($_POST['is_incenter']))
                 {
                     echo "<script>document.inputform.is_incenter.value=\"".$_POST['is_incenter']."\";</script>";
                 }
                 if(isset($_POST['sync_status']))
                 {
                     echo "<script>document.inputform.sync_status.value=\"".$_POST['sync_status']."\";</script>";
                 }
                 ?>
                 <input name="cmbStatus" type="checkbox" id="cmbStatus" <?php  echo $adminSrch->cmbStatus ?> >
   	        退会済みも表示</td>
            <td width="22%">　　
          <input class="btn search" value="" type="submit">&nbsp;&nbsp;<input value="" type="submit" class="btn refresh">          </td>
      </tr>
      </table><br />
	<?php
    if($adminSrch->errorMessage != null && $adminSrch->errorMessage != "")
		echo "<font id=errorMsg name=errorMsg color=red>".$adminSrch->errorMessage."</font><br>";
    ?>
      <table class="tbl" border="0" cellpadding="4" cellspacing="0">
        <tbody>
        <tr align="center" class="tr2" >
            <td ><strong>ID</strong></td>
            <td ><strong>ユーザ名</strong></td>
            <td ><strong>パスワード</strong></td>        
            <td ><strong>会社名</strong></td>
            <td ><strong>役職名</strong></td>
            <td ><strong>担当者名</strong></td>
            <td ><strong>電話</strong></td>
            <td ><strong>メールアドレス</strong></td>
            <td ><strong>会社規模</strong></td>
            <td ><strong>業種</strong></td>
            <td ><strong>住所</strong></td>
            <td ><strong>部署</strong></td>
            <td ><strong>fax番号</strong></td>
            <td ><strong>郵便番号</strong></td>
            <td ><strong>会員状態</strong></td>
            <td ><strong>同期状況</strong></td>
            <td ><strong>同期バッチ</strong></td>
            <td ><strong>登録状況</strong></td>
            <td ><strong>アカウント情報</strong></td>
            <td ><strong>最終ログイン日時</strong></td>
            <td ><strong>会員登録日時</strong></td>
            <td ><strong>退会</strong></td>
            <td ><strong>削除</strong></td>
        </tr>
         <?php echo $adminSrch->memberInfoList;?>
        </tbody>
      </table>
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
        <tbody><tr align="right"> 
        <td align="right">
        <?php echo "<label id='fromToPage' name='fromToPage'>".$adminSrch->fromToPage."</label>";?>    
        <?php echo "<label id='memberInfoCount' name='memberInfoCount'>".$adminSrch->memberInfoCount."</label>";?></td><td>
        </td><td width="10"><a href="javascript:document.getElementById('nowPage').value = 1;do_search();">[1]</a></td>  
        </tr>
        </tbody>
    </table>

      </form>
    <br />
    </td>

  </tr>
 </table>
<?php include("../foot.php");?>
</body>
</html>